* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fef9f9;
    color: #666;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #ffe8f0 0%, #ffd9e6 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    background-color: #ffd1dc;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.logo-icon i {
    font-size: 24px;
    color: #f4acb7;
}

h1 {
    color: #e67b92;
    font-size: 24px;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #e67b92;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #f4acb7;
}

nav ul li a i {
    margin-right: 8px;
}

/* 主要内容区域 */
.page {
    padding: 30px 0;
}

.current-time {
    text-align: center;
    font-size: 18px;
    color: #e67b92;
    margin-bottom: 25px;
    padding: 10px;
    background-color: rgba(255, 225, 230, 0.7);
    border-radius: 8px;
}

.card-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #e67b92;
    font-weight: 600;
}

.card-title i {
    margin-right: 10px;
    color: #f4acb7;
}

/* 网关状态 */
.gateway-status {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.15);
    border: 1px solid #ffd1dc;
}

.gateway-icon {
    background-color: #fff0f5;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.gateway-icon i {
    font-size: 28px;
    color: #f4acb7;
}

.gateway-title {
    font-weight: 600;
    color: #e67b92;
    margin-bottom: 5px;
    font-size: 18px;
}

.gateway-desc {
    color: #e67b92;
    font-size: 14px;
}

.status-label {
    font-weight: 500;
    margin-right: 5px;
    color: #e67b92;
}

.status-value {
    margin-right: 15px;
    color: #f4acb7;
}

input[type="button"] {
    background-color: #ffd1dc;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #e67b92;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.3s;
    font-weight: 500;
}

input[type="button"]:hover {
    background-color: #f4acb7;
    color: white;
}

/* 环境状态 */
.env-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-item {
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.15);
    transition: all 0.3s;
    border: 1px solid #ffd1dc;
    position: relative;
    overflow: hidden;
}

.status-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.25);
}

.status-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffd1dc, #f4acb7);
}

.status-label {
    font-size: 14px;
    color: #e67b92;
    margin-bottom: 10px;
}

.status-value {
    font-size: 24px;
    font-weight: 600;
    color: #e67b92;
    margin-bottom: 5px;
}

.status-desc {
    font-size: 14px;
    color: #f4acb7;
    font-weight: 500;
}

/* 仪表盘 */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.15);
    border: 1px solid #ffd1dc;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffd1dc, #f4acb7);
}

/* 控制网格 */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff0f5;
    border-radius: 12px;
    transition: all 0.3s;
}

.control-item:hover {
    background-color: #ffd1dc;
}

.control-name {
    font-weight: 500;
    color: #e67b92;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffd1dc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #f4acb7;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 摇篮档位控制 */
.cradle-control {
    grid-column: 1 / -1;
    background-color: #fff0f5;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ffd1dc;
}

.cradle-status {
    font-size: 16px;
    color: #e67b92;
    margin-bottom: 15px;
    font-weight: 500;
}

.gear-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.gear-btn {
    background-color: #ffd1dc;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #e67b92;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.gear-btn:hover, .gear-btn.active {
    background-color: #f4acb7;
    color: white;
}

/* 空调温度控制 */
.temperature-control {
    grid-column: 1 / -1;
    background-color: #fff0f5;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ffd1dc;
}

.temp-display {
    font-size: 28px;
    font-weight: 600;
    color: #e67b92;
    margin-bottom: 15px;
}

.temp-slider {
    width: 80%;
    margin: 15px 0;
    accent-color: #f4acb7;
}

.temp-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.temp-btn {
    background-color: #ffd1dc;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #e67b92;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.temp-btn:hover {
    background-color: #f4acb7;
    color: white;
}

/* 控制模块容器 */
.control-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

/* 监控区域 */
.monitor-view {
    background-color: #fff0f5;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    border: 1px solid #ffd1dc;
}

.monitor-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffd1dc;
}

/* 图表容器 */
.chart-container {
    background-color: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.15);
    margin-bottom: 30px;
    border: 1px solid #ffd1dc;
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffd1dc, #f4acb7);
}

.chart-placeholder {
    width: 100%;
    height: 500px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #e67b92;
    border-top: 1px solid #ffd1dc;
    margin-top: 30px;
    background-color: #fff0f5;
    border-radius: 0 0 16px 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .control-modules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 15px;
        justify-content: center;
    }
    
    .gateway-status {
        flex-direction: column;
        text-align: center;
    }
    
    .gateway-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .env-status {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .temp-buttons, .gear-selector {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .env-status {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .gateway-desc {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    input[type="button"] {
        margin-top: 10px;
        margin-left: 0;
    }
}

/* 添加一些母婴主题的小元素 */
.card-title::after {
    content: "👶";
    margin-left: 10px;
    font-size: 20px;
}

.status-item:nth-child(1)::after {
    content: "🌡️";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.7;
}

.status-item:nth-child(2)::after {
    content: "💧";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.7;
}

.status-item:nth-child(3)::after {
    content: "❤️";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.7;
}

.status-item:nth-child(4)::after {
    content: "💡";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.7;
}

.status-item:nth-child(5)::after {
    content: "🌡️";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.7;
}